package com.xiaohui.feigin.service;


import feign.Request;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.concurrent.TimeUnit;

@FeignClient(name ="frame-cloud-sku")
@Component
public interface SkuFeignService {


    /**
     * 设置超时时间
     */
//    private static final Request.Options options = new Request.Options(5L, TimeUnit.SECONDS,
//            1L, TimeUnit.HOURS, Boolean.TRUE);
//    /**
//     * 实际转运量数据对接
//     */
//    public void dataActualTransDocking(String companyCode) {
//        AjaxResult ajaxResult = remoteCustomizedDataService.actualTransDocking(options, new DataActualTransDTO(),
//                companyCode, SecurityConstants.INNER);
//        throwException(ajaxResult);
//    }

    @RequestMapping("/test")
    public String test();


    @GetMapping("/testHystrix")
    public String testHystrix();

    @GetMapping("/testHystrixTimeout")
    public String testHystrixTimeout();
}
